package com.rmondjone.androidcamerademo

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.rmondjone.androidcamerademo.bean.HomeBean

/**
 * copyright：
 * @author：anthui creation date： .
 * @since: 1.0.0
 * @describe:
 */
class HomeAdapter : BaseQuickAdapter<HomeBean, BaseViewHolder>(R.layout.item_list_home) {
    override fun convert(helper: BaseViewHolder, item: HomeBean) {

        var view = helper.getView<ImageView>(R.id.iv_pic)
        Glide.with(mContext).load(item.images).into(view)

        helper.setText(R.id.tv_title, item.name)
        helper.setText(R.id.tv_content, item.description)
    }


}